-- GENERATED SPELL FOR [Stonevault Flameweaver] --


function spell0_7321(pUnit, Event) --@Fire Shield IV,n/a--
pUnit:FullCastSpellOnTarget(2602,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7321', 16000, 1)
end

function spell1_7321(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(2941,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7321', 17000, 1)
end

function spell2_7321(pUnit, Event) --@Inferno Shell,Self--
pUnit:FullCastSpellOnTarget(7739,pUnit)
pUnit:RegisterEvent('Sorts_7321', 13000, 1)
end

function Sorts_7321(pUnit, Event)
local choix_sorts_7321 = math.random(0, 2)
if choix_sorts_7321 == 0 then
pUnit:RegisterEvent('spell0_7321', 1, 1)
end
if choix_sorts_7321 == 1 then
pUnit:RegisterEvent('spell1_7321', 1, 1)
end
if choix_sorts_7321 == 2 then
pUnit:RegisterEvent('spell2_7321', 1, 1)
end
end

function mob7321_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7321', math.random(1500, 3000), 1)
end

function mob7321_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7321_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7321_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7321, 1, 'mob7321_Action')
RegisterUnitEvent(7321, 2, 'mob7321_Leave')
RegisterUnitEvent(7321, 3, 'mob7321_Kill')
RegisterUnitEvent(7321, 4, 'mob7321_Die')
